﻿using EAS.Content.Items;
using Terraria;
using Terraria.GameContent.ItemDropRules;
using Terraria.ID;
using Terraria.ModLoader;

namespace EAS.Common.GlobalNPCs
{
    public class NPCLoots : GlobalNPC
    {
        public override bool InstancePerEntity => true;
        public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
        {
            if (npc.type == NPCID.BloodZombie)
            {
                npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<BleedingHeart>(), 100, 1));
            }
            if (npc.type == NPCID.Dolphin)
            {
                npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<HeartOfOcean>(), 50, 1));
            }
            if (npc.type == NPCID.KingSlime)
            {
                npcLoot.Add(ItemDropRule.MasterModeCommonDrop(ModContent.ItemType<KingSlimeCrown>()));
            }
            if (npc.type == NPCID.Golem)
            {
                npcLoot.Add(ItemDropRule.MasterModeCommonDrop(ModContent.ItemType<EyeOfFury>()));
            }
            if (npc.type == NPCID.BrainofCthulhu)
            {
                npcLoot.Add(ItemDropRule.MasterModeCommonDrop(ModContent.ItemType<ForceShield>()));
            }
            if (npc.type == NPCID.EyeofCthulhu)
            {
                npcLoot.Add(ItemDropRule.MasterModeCommonDrop(ModContent.ItemType<CthulhuEmblem>()));
            }
            if (npc.type == NPCID.TheDestroyer)
            {
                npcLoot.Add(ItemDropRule.MasterModeCommonDrop(ModContent.ItemType<WormRemote>()));
            }
            if (npc.type == NPCID.SkeletronHead)
            {
                npcLoot.Add(ItemDropRule.MasterModeCommonDrop(ModContent.ItemType<DeathBone>()));
            }
            if (npc.type == NPCID.RedDevil)
            {
                npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<DevilsFeather>(), 33, 1));
            }
            if (npc.type == NPCID.SeekerHead)
            {
                npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<Cursestone>(), 50, 1));
            }
            if (npc.type == NPCID.IchorSticker)
            {
                npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<IchorStone>(), 50, 1));
            }
            if (npc.type == NPCID.IceElemental)
            {
                npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<FrozenStone>(), 150, 1));
            }
            if (npc.type == NPCID.IcyMerman)
            {
                npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<FrozenStone>(), 50, 1));
            }
        }
    }
}
